
import { React, Component } from 'react';
import store from '../../store/store/index';
export default class test extends Component {

  constructor(props) {
    super(props);
    this.state = store.getState();
    //subscribe当store中数据发生变化就会更新数据
    store.subscribe(()=>{
        this.setState(store.getState())
    })
   
  }
  render () {
    return (
      <div className='project-view' > 
        {this.state.num}
      </div>
    );
  }
}
